tegorię <?php echo $category['PhotoCategory']['title']; ?></h2>
<a href="/gallery">Powrót do listy kategorii</a>

<?php
Optimiser::addCssFile("css/gallery.css");

echo $this->Blueprint->info("Czy chcesz ".$this->Html->link("zmienić nazwę", array("action" => "admin_rename_category", $category['PhotoCategory']['id'])." tej kategorii?");
?>

<div class="gallery-photos gallery-container">
       <?php
	       foreach ($category['Photo'] as $photo) {
			          echo("<div class=\"gallery-thumbnail\"><a rel=\"gallery\" href=\"/" . Configure::read("Gallery.photos_dir") . "/" . $photo['id'] . ".jpg\" title=\"".$category['PhotoCategory']['title']."\">");
					          echo(" <img class=\"gallery-photo\" src=\"");

					          if (file_exists(Configure::read("Gallery.photos_dir") . "/" . $photo['id'] . "_small.jpg"))
								             echo("/" . Configure::read("Gallery.photos_dir") . "/" . $photo['id'] . "_small.jpg");
							          else
										             echo("/gallery/generate_thumbnail/" . $photo['id']);
							          echo("\" />");
							          echo("</a></div>");
									      }   
    ?>  
 </div>
